@import "../macrocosm/index";
@import "./attr.shadow.scss";

@mixin uca_collapse($body) {
  .ant-collapse .ant-collapse-item {
    .ant-collapse-header {
      padding: $uni_font * 0.6 $uni_font;
      background-color: $uni_color;
      color: white;
    }

    .ant-collapse-content > .ant-collapse-content-box {
      padding: $body
    }
  }
}

@mixin uca_drawer($paddingV: 0, $paddingH: $uni_font * 0.1) {
  z-index: 980;

  .ant-drawer-body {
    padding: $paddingV $paddingH;
  }
}

@mixin uca_popover($body) {
  z-index: 960;
  .ant-popover-content {
    .ant-popover-inner {
      padding: 0;

      .ant-popover-title {
        height: $uni_font * 4;
        margin-bottom: 0;
        border-bottom: dotted 1px $uni_color;
        padding-left: $uni_font * 1.8;
        padding-right: $uni_font * 0.8;

        h3 {
          margin: $uni_font 0;
        }
      }

      .ant-popover-inner-content {
        padding: 0;
      }
    }
  }
}

@mixin uca_popover_content($body) {
  .ux_popover_body {
    padding: $body;
  }

  .ux_popover_footer {
    padding: $uni_font * 0.5 0;
    width: 100%;
    text-align: center;
    background-color: $uni_color;
    border-bottom-left-radius: $uni_font * 0.3;
    border-bottom-right-radius: $uni_font * 0.3;

    button {
      min-width: 90px;
      border-radius: 16px;
    }

    .ant-btn-primary {
      border: solid 1px white;
      margin-left: 8px;
    }
  }
}


@mixin uca_dialog($body) {
  .ant-modal-content {
    @include attr_shadow_box(8px, 8px);
    padding: 0;

    .ant-modal-header {
      padding: $uni_font * 1.1 $uni_font * 1.8;
      border-bottom: dotted 1px $uni_color;
      margin-bottom: 0;
    }

    .ant-modal-body {
      padding: $body;
    }

    .ant-modal-footer {
      text-align: center;
      background-color: $uni_color;
      padding: $uni_font * 0.5;
      border-bottom-left-radius: $uni_font * 0.3;
      border-bottom-right-radius: $uni_font * 0.3;
      margin-top: $uni_font * 0.2;

      button {
        min-width: $uni_font * 7;
        border-radius: $uni_font * 3;
        margin: $uni_font * 0.2;
      }

      .ant-btn-primary {
        border: solid 1px white;
      }
    }
  }
}